import fetch from "@/api/fetch"
import constants from "@/api/constants"

const baseURL = constants.baseURL + "/member/";

const api = {
    // 收货地址
    address: {
        // 分页列表
        list(memberId) {
            return fetch.get(baseURL + "/deliveryAddress/list/" + memberId);
        },
        // 详情
        info(id) {
            return fetch.get(baseURL + "/deliveryAddress/" + id);
        },
        // 新增
        save(form) {
            return fetch.post(baseURL + "/deliveryAddress/save", form);
        },
        // 编辑
        update(form) {
            return fetch.post(baseURL + "/deliveryAddress/update", form);
        },
        // 删除
        delete(id) {
            return fetch.post(baseURL + "/deliveryAddress/delete/" + id);
        }
    }
}

export default api;